<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title><%=title %></title>
</head>
<link rel="stylesheet" href="stylesheets/font-awesome.min.css">
<link rel="stylesheet" href="stylesheets/reset.css">
<link rel="stylesheet" href="stylesheets/main.css">
<link rel="stylesheet" href="stylesheets/index.css">
<style>
</style>
<body>
	<%- include header -%>
	<input id="pages" type="hidden" value=<%=pages %>>
	<input id="current_page" type = "hidden" value=<%=currentpage %>>
	<div class="index-content common-content clearfix">
		<div class="container">
			<div class="main-content">
				<nav class="main-nav">
					<ul id="type_list" class="main-nav-list">
						<li class="main-nav-list-item"><a href="/index">全部</a></li>
						<% types.forEach(function(type,key){ %>   
						<li class="main-nav-list-item"><a data-type=<%=type.type %> href="/index?type=<%=type.type %>"><%=type.description%></a></li>
						<% })%>
						
					</ul>
				</nav>
				<ul class="main-note-list">
					<% posts.forEach(function(item,key){%>
						<li class="main-note-list-item">
						<a href="" class="person-img">
							<img src=<%=item.user.head %> alt=""> 
						</a>
						<span class="note-number-data"><span class="note-command-number">45</span>/<span class="note-visit-number">1983</span></span>
						<span class="note-class"><%=item.type.description %></span>
						<a href="/topic/<%=item._id %>" class="note-title"><%=item.title %></a>
						<% if(item.comment){%>
						<a href="" class="last-command">
							<span class="last-command-img"><img src=<%=item.user.head %> alt=""></span>
							<span class="last-command-time"><%=item.comment.time%></span>
						</a>
						<% } %>
					</li>
					<% })%>
				</ul>
        <div class="page-controller" id="page_controller">
          <ul class="page-controller-list">
            <!-- <li class="page-controller-item"><span><i class="fa fa-angle-double-left"></i></span></li>
            <li class="page-controller-item"><span><i class="fa fa-angle-left"></i></span></li>
            <li class="page-controller-item active"><span>1</span></li>
            <li class="page-controller-item"><a href="">2</a></li>
            <li class="page-controller-item"><a href="">3</a></li>
            <li class="page-controller-item"><a href="">4</a></li>
            <li class="page-controller-item"><a href="">5</a></li>
            <li class="page-controller-item">...</li>
            <li class="page-controller-item"><a href=""><i class="fa fa-angle-right"></i></a></li>
            <li class="page-controller-item"><a href=""><i class="fa fa-angle-double-right"></i></a></li> -->
          </ul>
        </div>
			</div>
			<div class="slide-content">
				<div class="status-content">
					<% if(!USER){%>
					<h2 class="status-title">CNode: Node.js专业中文社区</h2>
					<p class="status-info">您可以通过 <a href = '/signin'>登录</a> 或 <a href = '/signup'>注册</a>
					<%}else {%>
					<div class="user-info">
					<h3 class=>个人信息</h3>
					<div class="user-main-info">
						<a href="" class="user-img"><img src=<%=USER.head %> alt=""></a>
				  		<span class="user-name"><%=USER.username %></span>
					</div>
					<p class="user-sign">"这个同学很懒，什么都没有留下。"</p>
				</div>
					 <%}%>
					</p>
				</div>
				<div class="no-command-note">
					<h3 class="no-command-note-title">无人回复的话题</h3>
					<ul class="no-command-note-list">
						<li class="no-command-note-list-item"><a href="">无人回复的话题</a></li>
						<li class="no-command-note-list-item"><a href="">无人回复的话题</a></li>
						<li class="no-command-note-list-item"><a href="">无人回复的话题</a></li>
						<li class="no-command-note-list-item"><a href="">无人回复的话题</a></li>
						<li class="no-command-note-list-item"><a href="">无人回复的话题</a></li>
					</ul>
				</div>
				<% if(USER){%>
				<div class="post-area">
					<a href="/post" class="post-button">发布话题</a>
				</div>
				<%}%>
				<div class="frindely-community">
					<h3 class="frindely-community-title">友情社区</h3>
					<ul class="frindely-communtity-list">
						<li class="frindely-communtity-list-item"><a target="_blank" href="https://ruby-china.org/"><img src="imgs/frindelyCommunityImg1.png" alt=""></a></li>
						<li class="frindely-communtity-list-item"><a target="_blank" href="http://golangtc.com/"><img src="imgs/frindelyCommunityImg2.png" alt=""></a></li>
						<li class="frindely-communtity-list-item"><a target="_blank" href="https://laravel-china.org/"><img src="imgs/frindelyCommunityImg3.png" alt=""></a></li>
						<li class="frindely-communtity-list-item"><a target="_blank" href="https://testerhome.com/"><img src="imgs/frindelyCommunityImg4.png" alt=""></a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<%- include footer -%>
	<script src="js/jquery-1.11.1.js"></script>
	<script src="js/util.js"></script>
	<script src="js/index.js"></script>
</body>